package com.ternnetwork.oa.entity.settings;

import com.ternnetwork.oa.enums.settings.UserRelationshipType;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Enumerated;
import java.io.Serializable;

@Embeddable
@Data
public class UserRelationshipId implements Serializable {

    @Column(name="USER_ID_FROM",nullable=false)
    private long userIdFrom;
    @Column(name="USER_ID_TO",nullable=false)
    private long userIdTo;
    @Enumerated
    @Column(name="type",nullable=false)
    private UserRelationshipType type;

    public UserRelationshipId(long userIdFrom, long userIdTo, UserRelationshipType type) {
        this.userIdFrom = userIdFrom;
        this.userIdTo = userIdTo;
        this.type = type;
    }

    public UserRelationshipId() {
        super();
    }
}
